Currently, most high availability (HA) distributed clusters are generally centralized with one master (a Master node) and multiple slaves (Slave nodes). A Master node sends a heartbeat message to all Slave nodes in a cluster, and each Slave node in the cluster also sends a heartbeat message to the Master node. The Slave node performs detection on the heartbeat message sent by the Master node to determine whether the Master node is faulty. The Master node performs detection on the heartbeat message sent by the Slave node to determine whether the Salve node is faulty.
However, the foregoing failure detection has the following disadvantage. Generally, only when the Slave node determines for multiple times that no heartbeat message is received from the Master node, the Salve node may consider that the Master node is faulty, and then initiate an election policy that is used for determining a new Master node in the cluster. Therefore, in other approaches, a time for failure detection performed on a Master node is excessively long.